﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="menu_edit.aspx.cs" Inherits="TCMSystem.admin.menu_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
    <ext:SimpleForm ID="SimpleForm1" ShowBorder="false" ShowHeader="false" runat="server"
        BodyPadding="10px" EnableBackgroundColor="true" Title="SimpleForm">
        <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                        Text="关闭">
                    </ext:Button>
                    <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                    </ext:ToolbarSeparator>
                    <ext:Button ID="btnSaveClose" ValidateForms="SimpleForm1" Icon="SystemSaveClose"
                        OnClick="btnSaveClose_Click" runat="server" Text="保存后关闭">
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <Items>
            <ext:TextBox ID="tbxTitle" runat="server" Label="菜单名称" Required="true" ShowRedStar="true">
            </ext:TextBox>
            <ext:DropDownList ID="ddlParent" Label="上级菜单" Required="true" ShowRedStar="true"
                runat="server">
            </ext:DropDownList>
            <ext:NumberBox ID="tbxSortIndex" Label="排序" Required="true" ShowRedStar="true" runat="server">
            </ext:NumberBox>
            <%--<ext:TextBox ID="tbxName" runat="server" Label="模块名称" Required="true" ShowRedStar="true">
            </ext:TextBox>--%>
            <ext:DropDownList runat="server" Label="模块名称" EnableEdit="true" ID="ddlModules">
            </ext:DropDownList>
            <ext:TextBox ID="tbxUrl" runat="server" Label="链接">
            </ext:TextBox>
            <ext:TextBox ID="tbxIcon" runat="server" Label="图标">
            </ext:TextBox>
            <ext:RadioButtonList ID="iconList" ColumnNumber="4" runat="server">
            </ext:RadioButtonList>
            <%--<ext:CheckBox ID="cbxIsModule" runat="server" Label="是否模块">
            </ext:CheckBox>--%>
            <ext:TextArea ID="tbxRemark" runat="server" Label="备注">
            </ext:TextArea>
        </Items>
    </ext:SimpleForm>
    </form>
    <script type="text/javascript">
        function onReady() {
            var iconList = X('<%= iconList.ClientID %>');
            var tbxIcon = X('<%= tbxIcon.ClientID %>');

            iconList.on('change', function (group, radio) {
                tbxIcon.setValue(radio.getRawValue());
            });

            tbxIcon.on('change', function (field, newValue, oldValue) {
                iconList.setValue(newValue);
            });
        }
    </script>
</body>
</html>
